import { Map } from "immutable";
import { CHANGE_SONG_DETAIL } from "./constants";

const initialState = Map({
  curSong: {}
});

function reducer(state = initialState, { type, payload }) {
  switch (type) {
    case CHANGE_SONG_DETAIL:
      return state.set('curSong', payload)
    default:
      return state;
  }
}

export default reducer;
